import * as mongoose from 'mongoose';
import db from '../lib/db/mongodb';

let  temporarDataSchema:mongoose.Schema=new mongoose.Schema({
    month:String,//月份     清除暂存数据用
    number:String,
    userId:String,//员工id
    jobnumber:String,//员工工号
    plantype:String,//拜访类型
    planPurpose:String,//计划的拜访目的
    name:String,//名称
    code:String,//编码
    date:String,//拜访日期
    location:String,//签到地址   
    pic:String,//图片
    way:String,//拜访方式
    recoderPurpose:String,
    talkPersonName:String,
    talkPersonJob:String,
    connection:String,
    visitResult:String,
    followMatter:String,
    cooperation:String,
    //门店
    sampleList:[],//样机列表[]
    storeType:String,
    isListSample:Boolean,
    isListStandard:Boolean,
    competitor:String,
    storeActivity:String,
    pictureStoreActivity:String,
    listLetter:String,
    information:[{
        mouseList:[],//鼠标
        newProductList:[],//新品上架
        isListNewProduct:Boolean,
        keyBoardType:String,
        pictureBrand:String,//品牌专区照片
        brand:String,//品牌专区
        isListPart:Boolean,
        pictureFullContainer:String,
        // storeFigure:String,//店内形象
        pictureStoreFigure:String,//形象照片
        brandPicture:String,//品牌专区形象照片2
        picturePosm:String,//POSM形象照片
        pictureFrame:String,//画面形象照片
        storeTypes:String,
        quarterNecessarySUK:String,
        pictureSUK:String,
        pictureListFocus:String,//集中陈列图片
        isListFocus:Boolean
    }]

},{collection:'temporaryData'});
export interface TemporaryData extends mongoose.Document{
    month:string;
    number:string;
    userId:string;//员工id
    jobnumber:string;//员工工号
    plantype:string;//拜访类型
    planPurpose:string;//计划的拜访目的
    name:string;//名称
    code:string;//编码
    date:string;//拜访日期
    location:string;//签到地址   
    pic:string;//图片
    //客户
    way:string;//拜访方式
    recoderPurpose:string;
    talkPersonName:string;
    talkPersonJob:string;
    connection:string;
    visitResult:string;
    followMatter:string;
    cooperation:string;
    //门店
    sampleList:any[],//样机列表[]
    storeType:string;
    isListSample:boolean;
    isListStandard:boolean;
    competitor:string;
    storeActivity:string;
    pictureStoreActivity:string;
    listLetter:string;
    information:[{
        mouseList:any[],//鼠标
        newProductList:any[],//新品上架
        isListNewProduct:boolean,
        keyBoardType:string,
        pictureBrand:string,//品牌专区照片
        brand:string,//品牌专区
        isListPart:boolean,
        pictureFullContainer:string,
        // storeFigure:string,//店内形象
        pictureStoreFigure:string,//形象照片
        brandPicture:string;//品牌专区形象照片2
        picturePosm:string;//POSM形象照片
        pictureFrame:string;//画面形象照片
        storeTypes:string,
        quarterNecessarySUK:string,
        pictureSUK:string,
        pictureListFocus:string,//集中陈列图片
        isListFocus:boolean
    }]
}
 let temporaryDataModel=db.model<TemporaryData>('temporaryData',temporarDataSchema);
//  let temporaryDataModel=db.model('temporaryData',temporarDataSchema);
export default temporaryDataModel; 